package it.patterns.structural.bridge;

/**
 * Decouple an abstraction from its implementation so that the two can vary
 * independently.
 * 
 * Abstraction forwards client requests to its implementor object.
 * 
 * Advantages are:
 * <ul>
 * <li>Decoupling interface from implementation</li>
 * <li>Improved extensibility</li>
 * <li>Hiding implementation details from clients</li>
 * </ul>
 * 
 * It is useful when:
 * <ul>
 * <li>you want to avoid permanent binding between an abstraction and its
 * implementation. (e.g. dynamic binding).</li>
 * <li>change an implementation should have no impact on clients.</li>
 * <li>both the abstraction and the implementation should be extensible by
 * subclassing.</li>
 * <li>You have a proliferation of classes: Such a class hierarchy indicates the
 * need for splitting an object into two parts.</li>
 * </ul>
 * 
 * <img src="Bridge.jpg" alt="Pattern Structure"/>
 * 
 * 
 * @author Luca D'Onofrio
 * 
 * @category Structural Pattern
 * @see "Design Patterns - Element of Reusable Object Oriented Software (Gamma,Helm, Johnson, Vlissides)"
 * 
 * @version 1.0
 */
public class Bridge {
	public String operation(Implementor implementor) {
		return implementor.operationImplementation();
	}
}
